package tech.wetech.admin3.util;

import java.util.Arrays;

public class OrderUtil {

  public static String generateOrderNumber(String type) {
    // 获取当前时间戳
    long timestamp = System.currentTimeMillis();
    // 生成一个0-999之间的随机数
    int randomNumber = (int) (Math.random() * 1000);
    // 拼接订单号
    String orderNumber = "szr-" + type + timestamp + "-" + randomNumber;
    return orderNumber;
  }
}
